home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sun4c / archive / tcltk.z / tcltk / man / cat3 / RegExp.3 < prev    next >
Text File  |  1994-09-20  |  2KB  |  67 lines

  1.  
  2.  
  3.  
  4. Tcl_RegExpMatch(3)   Tcl Library Procedures                   7.0
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NAME
  11.      Tcl_RegExpMatch - Test whether a string  matches  a  regular
  12.      expression
  13.  
  14. SYNOPSIS
  15.      #include <tcl.h>
  16.  
  17.      int
  18.      Tcl_RegExpMatch(_i_n_t_e_r_p, _s_t_r_i_n_g, _r_e_g_e_x_p)
  19.  
  20. ARGUMENTS
  21.      Tcl_Interp   *_i_n_t_e_r_p   (in)      Tcl interpreter to use  for
  22.                                       error reporting.
  23.  
  24.      char         *_s_t_r_i_n_g   (in)      String to test.
  25.  
  26.      char         *_r_e_g_e_x_p   (in)      Regular expression to match
  27.                                       against _s_t_r_i_n_g.
  28. _________________________________________________________________
  29.  
  30.  
  31. DESCRIPTION
  32.      Tcl_RegExpMatch  determines  whether  its  _s_t_r_i_n_g   argument
  33.      matches  _r_e_g_e_x_p,  where  _r_e_g_e_x_p  is interpreted as a regular
  34.      expression using the same rules as for the regexp  Tcl  com-
  35.      mand.   If  there is a match then Tcl_RegExpMatch returns 1.
  36.      If there is no match then Tcl_RegExpMatch returns 0.  If  an
  37.      error  occurs  in the matching process (e.g. _r_e_g_e_x_p is not a
  38.      valid regular expression) then  Tcl_RegExpMatch  returns  -1
  39.      and leaves an error message in _i_n_t_e_r_p->_r_e_s_u_l_t.
  40.  
  41.  
  42. KEYWORDS
  43.      match, regular expression, string
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Tcl                                                             1
  64.  
  65.  
  66.  
  67.